package com.kanche.bigbaby.bean;

import org.json.*;

import java.io.Serializable;
import java.util.ArrayList;

public class ExtraInfo implements Serializable {
	
    private ArrayList<String> competitions;
    private String seriesNumber;
    private SocialAccount socialAccount;
    
    
	public ExtraInfo () {
		
	}	
        
    public ExtraInfo (JSONObject json) {
    

        this.competitions = new ArrayList<String>();
        JSONArray arrayCompetitions = json.optJSONArray("competitions");
        if (null != arrayCompetitions) {
            int competitionsLength = arrayCompetitions.length();
            for (int i = 0; i < competitionsLength; i++) {
                String item = arrayCompetitions.optString(i);
                if (null != item) {
                    this.competitions.add(item);
                }
            }
        }
        else {
            String item = json.optString("competitions");
            if (null != item) {
                this.competitions.add(item);
            }
        }

        this.seriesNumber = json.optString("seriesNumber");
        this.socialAccount = new SocialAccount(json.optJSONObject("socialAccount"));

    }
    
    public ArrayList<String> getCompetitions() {
        return this.competitions;
    }

    public void setCompetitions(ArrayList<String> competitions) {
        this.competitions = competitions;
    }

    public String getSeriesNumber() {
        return this.seriesNumber;
    }

    public void setSeriesNumber(String seriesNumber) {
        this.seriesNumber = seriesNumber;
    }

    public SocialAccount getSocialAccount() {
        return this.socialAccount;
    }

    public void setSocialAccount(SocialAccount socialAccount) {
        this.socialAccount = socialAccount;
    }


    
}
